import request from "@/utils/request";

// 查询销售退货列表
export function listMachineCkBackM(query) {
  return request({
    url: "/back/machineCkBackM/list",
    method: "get",
    params: query,
  });
}

// 查询销售退货详细
export function getMachineCkBackM(id) {
  return request({
    url: "/back/machineCkBackM/" + id,
    method: "get",
  });
}

// 新增销售退货
export function addMachineCkBackM(data) {
  return request({
    url: "/back/machineCkBackM",
    method: "post",
    data: data,
  });
}

// 修改销售退货
export function updateMachineCkBackM(data) {
  return request({
    url: "/back/machineCkBackM",
    method: "put",
    data: data,
  });
}

// 删除销售退货
export function delMachineCkBackM(id) {
  return request({
    url: "/back/machineCkBackM/" + id,
    method: "delete",
  });
}

// 查询销售退货单号
export function getCkBackDocumentNo() {
  return request({
    url: "/back/machineCkBackM/getCkBackDocumentNo",
    method: "get",
  });
}

// 审核出库
export function auditMachineCkBackM(data) {
  return request({
    url: "/back/machineCkBackM/audit",
    method: "put",
    data: data,
  });
}
